/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 *//*

package cz.worsik.android.test.rideshare.util.listener;

import android.widget.CompoundButton;
import cz.worsik.android.test.rideshare.R;
import cz.worsik.android.test.rideshare.MainActivity;

	public class SettingChangeListener implements CompoundButton.OnCheckedChangeListener {

		String name;
		MainActivity a;
		
		public SettingChangeListener(MainActivity a, String name)
		{
			super();
			this.name = name;
			this.a = a;
		}
		
		public void onCheckedChanged(CompoundButton btn, boolean checked) {
			
			String value = "false";
			if (checked) {
				value = "true";
			}
			a.getDb().open();
			Boolean result = a.getDb().set(name,value);
			a.getDb().close();
			
			if (result) {
				a.showToast(a.getString(R.string.msg_settings_changed), false);
			}
			else {
				a.showToast(a.getString(R.string.error)+"\n"+a.getString(R.string.msg_settings_not_changed), false);
			}
		}
	}
*/
